import { getToken, setToken, removeToken } from '@/utils/auth'
export default {
  // 开启命名空间
  namespaced: true,
  state: {
    token: getToken() || ''
  },
  mutations: {
    updatatoken(state, token) {
      state.token = token
      //   实现持久化存储
      setToken(token)
    },
    deltoken(state) {
      state.token = ''
      removeToken()
    }
  },
  actions: {

  }
}
